﻿
using OddUserManager.Model;
using System;
using System.Collections.Generic;
using System.Text;

namespace OddUserManager.Service.IServices
{
    public interface IAppUserService
    {
        List<AppUser> GetAllUserList();
        /// <summary>
        /// 查找用户是否存在
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        AppUser CheckUser(string userName, string password);

        /// <summary>
        /// 插入或者更新用户
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        bool InsertOrUpdateUser(AppUser dto);

        bool UpdateLoginTime(int id, DateTime lastLogonTime, int logonTimes);
        /// <summary>
        /// 根据Id集合批量删除
        /// </summary>
        /// <param name="ids">Id集合</param>
        void DeleteBatchUsers(List<int> ids);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id">Id</param>
        void DeleteUserById(int id);

        /// <summary>
        /// 根据Id获取实体
        /// </summary>
        /// <param name="id">Id</param>
        /// <returns></returns>
        AppUser GetUserById(int id);
    }
}
